<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>	
<%
String path = request.getContextPath();
String bpath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=9" />
		<meta http-equiv="pragma" content="no-cache" />
		<title>井冈山智慧社区官方网站</title>
   	<script type="text/javascript" src="<%=bpath %>Scripts/jquery/jquery-1.7.1.min.js"></script> 
 	<link rel="stylesheet" type="text/css" href="<%=bpath%>Themes/default/css/responsive-tabs.css"/> 	
 	<script type="text/javascript" src="<%=bpath %>Scripts/jquery/jquery.responsiveTabs.js"></script> 
 	<link rel="stylesheet" type="text/css" href="<%=bpath%>pages/WebSubject/stjszt/css/pageMsg.css"/>
 	
 	<script type="text/javascript" src="<%=bpath %>pages/WebSubject/stjszt/js/util.js"></script> 
 	<script type="text/javascript" src="<%=bpath %>pages/WebSubject/stjszt/js/detailMsgPage.js"></script> 

 	<script type="text/javascript" >
		$(function(){	
			var menuId='${data.subjectMenu.id}';
			var topicId='${data.subjectMenu.topic_id}';
			loadNavMenu(topicId);
			loadMsgTitle(menuId);
			
			var sec_topic_bg_image = '${data.subjectTopic.sec_topic_bg_image}';
			
			changerBG(sec_topic_bg_image);
		});
		
		
		function changerBG(sec_topic_bg_image)
		{
			if(sec_topic_bg_image !='' )
			{
				$("body").css("background","url('"+sec_topic_bg_image+"')center top no-repeat");
			} 
			
		}
		
		
		function loadNavMenu(topic_id)
		{

			$.ajax({  
	 			type: "POST",  
	 	        url: '../WebSubject/loadSubjectMenus.json',  
	 	        data:{  
	 	        	topic_id:topic_id,
	 	        	parent_id:0,
	 		    },  
	 		    cache:false,  
	 		    dataType:'json',  
	 		    success:function(data) { 
	 		    	var str = "<li><a href='../WebSubject/subjectMain.htm?id="+topic_id+"'>首 页</a></li>";
	 		    	if(data != null && data.length>0){
	 		    		for(var i = 0; i< data.length; i++)
	 					{
	 		    			str+="<li><a href='../WebSubject/SubMenuPage.htm?id="+data[i].id+"' class='navfoucea'>"+data[i].title+"</a></li>";
	 					}
	 		    		
	 		    	}
	 		    	$("#navfouce").append(str);
	 		    },  
	 		     error : function() {  
	 		          alert("获取专题信息异常！");  
	 		     }  
	 		});
		}
 	
	 	function loadMsgTitle(menuId)
	 	{
	 		$.ajax({  
	 			type: "POST",  
	 	        url: '../WebSubject/loadSubjectMsg.json',  
	 	        data:{  
	 	        	menu_id:menuId,		    	    	  
	 		    },  
	 		    cache:false,  
	 		    dataType:'json',  
	 		    success:function(data) { 
	 		    	if(data!=null && data.length>0){
	 		    		
	 		    		$("#msg_title").empty();
	 		    		var str = "";
	 					for(var i = 0; i< data.length; i++)
	 					{
	 						var d = data[i].createTime;
	 						 var test = new Date(parseInt(d));  
	 						 var _year = test.getFullYear();  
	 						 var _month = parseInt(test.getMonth())+1;  
	 						 var _day = test.getDate();  
	 						 
	 						var href = "../WebSubject/detailMsgPage.htm?id="+data[i].id+"&menu_id=" +data[i].menu_id;
	 		    			if(data[i].isLink == '1')
	 		    			{
	 		    				href=data[i].linkURL;
	 		    			}
	 						str+="<li><p><a href='"+href+"'  target='_blank'>"+subStr(data[i].title, 30)+"</a>  &nbsp;&nbsp; <span  style='float:right'>"+_year+"年"+_month+"月"+_day+"日"+"</span></p></li>";
	 					}
	 					$("#msg_title").append(str);
	 		    	}else
	 		    		{
	 		    		$("#msg_title").empty();
	 		    		}
	 		    },  
	 		     error : function() {  
	 		          alert("获取专题信息异常！");  
	 		     }  
	 		});
	 	}
	 	
	
	</script>
 	
 	
</head>
<body>
	
	<div class="container">

	  <div class="top">
	    <div class="logo">
	    	<img src="../pages/WebSubject/stjszt/images/logo.gif" />
	    </div>
	  </div>

		<div class="navmenu">
		    <div class="nav">
		      <div class="list" id="navlist">
		        <ul id="navfouce">
		     
		        </ul>
		      </div>
		      
		    </div>
		  </div>

		<div class="content">
		    <div class="content_left">
			    <div class="sub_nav">
			      <h1 class="sub_title">${data.subjectMenu.title }</h1>
			      <ul>
			      		<c:forEach items="${data.lstSubjectMenu }" var="sm" >
			      			
			      			<li id="c1062"><a href="#" onmousemove="loadMsgTitle(${sm.id})" title="${sm.title }">${sm.title }</a></li>
			      		</c:forEach>

			      </ul>
			    </div>
	 	 </div>
	 	 
	 	 <div class="content_right">
					    <div class="position">
					      <p>当前位置： <a href="../WebSubject/subjectMain.htm?id=${data.subjectMenu.topic_id}" target="_blank">首页</a>&nbsp;&gt;&nbsp;
					      <a href="#" target="_blank">${data.subjectMenu.title}</a>&nbsp;</p>
					    </div>
					    <div class="list_content">
					      <div class="list_con">
					          <ul>
									
									 <ul id ="msg_title" class="grid-702 list-portrait content-in-li" style="border-bottom:1px dotted #CCC;">

									</ul>

								</ul>
					         <div class="fanye">
								  <div class="black2"> </div>
				 			 </div>
                 <!--fenye-->	          
      </div>
    </div>
  </div>
	    </div>
    
    <div class="bottomcont">
		  <div class="inkdress">
		  
		    <div class="dresscont">
				<p> <span id="_ideConac">
			  		<a href="http://bszs.conac.cn/sitename?method=show&id=29A96A3C476A6490E053012819AC9DCF" target="_blank">
			  		<img id="imgConac" vspace="0" hspace="0" border="0" src="/SmartCommunity/pages/WebSitePc/images/foot_red.png" data-bd-imgshare-binded="1"></img></a>
		  		</span>
		  		</p>
		  		<br />
		      <p>主办: 井冈山智慧社区  </p>
		    </div>
		  </div>

	</div>
</div>
</body>
</html>